home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19981211-19990422 / 000308_news@watsun.cc.columbia.edu _Tue Mar 2 18:03:01 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id SAA07999
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 2 Mar 1999 18:03:00 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id SAA19532
  7.     for kermit.misc@watsun.cc.columbia.edu; Tue, 2 Mar 1999 18:00:39 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: apatnaik@aircom.com
  10. Subject: question on kermit script
  11. Date: Tue, 02 Mar 1999 22:48:50 GMT
  12. Organization: Deja News - The Leader in Internet Discussion
  13. Message-ID: <7bhpsf$l17$1@nnrp1.dejanews.com>
  14. To: kermit.misc@mailrelay2.cc.columbia.edu
  15.  
  16. Hi,
  17.  
  18. I am attempting to write a kermit script that will initialize a modem,
  19. receive a call, wait for RING tone, and then output all the DTMF digits
  20. received. Note that modem is only expected to receive DTMF digits from an
  21. inbound call and not from another modem. It expects a digit of 9, in this
  22. case.
  23.  
  24. I have been using the C-Kermit 6.0 book to build the commands.
  25.  
  26. I have this script so far.. But all my INPUT commands fail...
  27. I tried this using interactive kermit and my commands worked. There is
  28. something about INPUT, MINPUT that is wrong. Appreciate any HELP!!! THANKS!!
  29.  
  30. define TONERECEIVER {
  31.         set modem type multitech
  32.         set line /dev/ttya
  33.         set speed 2400
  34.         set carrier-watch off
  35.         ;set input echo on
  36.         output connect\13
  37.         output at&fm0\13
  38.         clear input
  39.         minput 20 OK {CONNECT}
  40.         switch \v(minput) {
  41.           :0, echo {No response }, break
  42.           :1, echo {Succeeded in getting OK}, break
  43.           :2, echo {Found CONNECT}, break
  44.           :default, echo {Unexpected response: \v(input) }
  45.         }
  46.         clear input
  47.         output ats0=0\13
  48.         minput 20 OK {CONNECT}
  49.         switch \v(minput) {
  50.           :0, echo {No response }, break
  51.           :1, echo {Succeeded in getting OK WAIT FOR RING}, break
  52.           :2, echo {Found CONNECT}, break
  53.           :default, echo {Unexpected response: \v(input) }
  54.         }
  55.         clear input
  56.         minput 20 RING {CONNECT}
  57.         switch \v(minput) {
  58.           :0, echo {No response }, break
  59.           :1, echo {Succeeded in getting RING}, break
  60.           :2, echo {Found CONNECT}, break
  61.           :default, echo {Unexpected response: \v(input) }
  62.         }
  63.         clear input
  64.         output ath1\13
  65.         minput 20 OK {CONNECT}
  66.         switch \v(minput) {
  67.           :0, echo {No response }, break
  68.           :1, echo {Succeeded in getting OK WAIT FOR DIGIT 9}, break
  69.           :2, echo {Found CONNECT}, break
  70.           :default, echo {Unexpected response: \v(input) }
  71.         }
  72.         clear input
  73.         output at>dt1\13
  74.         minput 20 DTMF9 {CONNECT}
  75.         switch \v(minput) {
  76.           :0, echo {No response }, break
  77.           :1, echo {Succeeded in getting DTMF9}, break
  78.           :2, echo {Found CONNECT}, break
  79.           :default, echo {Unexpected response: \v(input) }
  80.         }
  81.  
  82. }
  83.  
  84.  
  85. -----------== Posted via Deja News, The Discussion Network ==----------
  86. http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own